package com.mega.com.mega;




import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.openqa.selenium.By;
//import org.junit.Before;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;


public class ProjectAdd {
  private WebDriver driver ;
  
  @Before
  public void setUp() throws Exception {
	    driver = new FirefoxDriver();
		driver.get("http://insofthr.trial.orangehrmlive.com/");
		driver.manage().window().maximize();
  }

  @Test
  public void testAddActivities() throws Exception {
  
    driver.findElement(By.id("txtUsername")).clear();
    driver.findElement(By.id("txtUsername")).sendKeys("sashik");
    driver.findElement(By.id("txtPassword")).clear();
    driver.findElement(By.id("txtPassword")).sendKeys("sasikumar555");
    driver.findElement(By.id("btnLogin")).click();
    driver.findElement(By.id("menu_time_viewTimeModule")).click();
    driver.findElement(By.id("menu_admin_ProjectInfo")).click();
    driver.findElement(By.id("menu_admin_viewProjects")).click();
    driver.findElement(By.linkText("test")).click();
    driver.findElement(By.id("btnAdd")).click();
    driver.findElement(By.id("addProjectActivity_activityName")).clear();
    driver.findElement(By.id("addProjectActivity_activityName")).sendKeys("test123");
    driver.findElement(By.id("btnActSave")).click();
  }

  @After
  public void tearDown() throws Exception {
    driver.quit();
  }

  
}
